#include "observer.h"
namespace design
{
	void Observable::Attach(Observer *o)
 	{
	   _observers.push_back(o);
 	}
 	
	void Observable::Detach(Observer *o)
	{
	   _observers.remove(o);
	}
	
	void Observable::Notify(int aspect)
	{
		ObserverPtrList::iterator it = _observers.begin();
		while (it != _observers.end())
		{
			(*it)->Update(this, aspect);
			it++;
		}
	}
}

